import json
import os

with open(os.path.normcase("static-data/all-indicators.json")) as f:
    d = json.load(f)
result = []
for goal in d:
    result.append(goal["description"])
    for target in goal["targets"]:
        result.append(f'    {target["description"]}')
        for indicator in target["indicators"]:
            result.append(f'        {indicator["description"]}')
result = "\n".join(result)
with open(os.path.normcase(f"static-data/description/all.txt"), 'w') as f:
    f.writelines(result)
